import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import About from './views/About.vue'
import Cart from './views/Cart.vue'
import My from './views/My.vue'
import Goodsaction from './views/Goodsaction.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/About',
      name: 'about',
      component: About
    },
    {
      path: '/Cart',
      name: 'cart',
      component: Cart
    },
    {
      path: '/My',
      name: 'my',
      component: My
    },
    {
      path: '/Goodsaction',
      name: 'goodsaction',
      component: Goodsaction
    },
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (about.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import(/* webpackChunkName: "about" */ './views/About.vue'),children:[
    //     {path:"/userstart",
    //      name: 'userstart',
    //      component: () => import(/* webpackChunkName: "about" */ './components/User/userstart.vue')},
    //     {
    //       path:"/useredit",
    //       name: 'useredit',
    //       component: () => import(/* webpackChunkName: "about" */ './components/User/useredit.vue')
    //     }
    //   ]
    // },
    
  ]
})
